import random

arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
length = len(arr)


def swap(arr, i, j):
    temp = arr[i]
    arr[i] = arr[j]
    arr[j] = temp


for i in range(length):
    j = random.randint(0, length - 1)
    swap(arr, i, j)
print(arr)
